package utils

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func ReadLine() string {
	reader := bufio.NewReader(os.Stdin)
	readString, err := reader.ReadString('\n')
	if err != nil {
		fmt.Println("读取失败")
	}
	return strings.TrimSpace(readString)
}

// 去掉字符串后面的换行符

func TrimNewLine(s string) string {
	return strings.TrimRight(s, "\n")
}
